//
//  QuDanUserCenterSendController.m
//  QuDanOEM
//
//  Created by xiaohuang on 2021/11/21.
//

#import "QuDanUserCenterSendController.h"
#import "QuDanUserCenterSendOrederViewCell.h"
@interface QuDanUserCenterSendController ()
@end
@implementation QuDanUserCenterSendController
- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = UIColor.whiteColor;
    self.tableView.sectionHeaderHeight = 0.01;
    self.tableView.sectionFooterHeight = 0.01;
    self.tableView.showsHorizontalScrollIndicator = NO;
    self.tableView.showsVerticalScrollIndicator = NO;
    self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
    [self.tableView registerNib:[UINib nibWithNibName:@"QuDanUserCenterSendOrederViewCell" bundle:nil] forCellReuseIdentifier:@"QuDanUserCenterSendOrederViewCell"];
}
#pragma mark - QuDanHomeRecommendController
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return 10;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    QuDanUserCenterSendOrederViewCell *sendOrderCell = [tableView dequeueReusableCellWithIdentifier:@"QuDanUserCenterSendOrederViewCell" forIndexPath:indexPath];
    return sendOrderCell;
}
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
    return 220;
}
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    [tableView deselectRowAtIndexPath:indexPath animated:YES];
}
#pragma mark --  HyCyclePageViewProviderProtocol
- (void)configCyclePageView:(HyCycleViewProvider<HyCyclePageView *> *)provider index:(NSInteger)index {
    // 主动设置引用
    // provider.retainProvider = YES;
    // __weak typeof(self) weakSelf = self;
    // block 自动引用
    [provider view:^UIView * _Nonnull(HyCyclePageView * _Nonnull cycleView) {
        return self.view;
    }];
}
- (void)scrollViewDidEndDragging:(UIScrollView *)scrollView
                  willDecelerate:(BOOL)decelerate {
    
    !self.scrollViewDidEndDragging ?:
    self.scrollViewDidEndDragging(scrollView);
}
@end
